import   axios   from "../utils/axios.js";

// 登录验证
export function login(opt){
    return  axios({
        url: '/user/login',
        method: 'post',
        baseURL: '/api',
        data:{
            username: opt.username,
            password: opt.password
        },
        header:{
            'Content-Type':'application/json'  //如果写成contentType会报错,如果不写这条也报错
            //Content type 'application/x-www-form-urlencoded;charset=UTF-8'...
        }
    })
};


